// 模拟数据
export const mockBuildings = [
  { id: 1, name: '1号楼', code: 'B001', description: '男生宿舍楼，设施完善', floors: 6, rooms: 120, type: 'male', status: 'active' },
  { id: 2, name: '2号楼', code: 'B002', description: '女生宿舍楼，环境优美', floors: 6, rooms: 120, type: 'female', status: 'active' },
  { id: 3, name: '3号楼', code: 'B003', description: '混合宿舍楼，现代化设计', floors: 8, rooms: 160, type: 'mixed', status: 'active' },
  { id: 4, name: '4号楼', code: 'B004', description: '男生宿舍楼，传统建筑', floors: 5, rooms: 100, type: 'male', status: 'inactive' }
]

export const mockLabels = [
  { id: 1, name: '向阳', category: 'environment', description: '房间朝南，采光良好', colors: ['yellow'], status: 'active', roomCount: 15, createdAt: '2023-08-01' },
  { id: 2, name: '安静', category: 'environment', description: '远离噪音源，环境安静', colors: ['blue'], status: 'active', roomCount: 8, createdAt: '2023-08-02' },
  { id: 3, name: '近卫生间', category: 'facility', description: '距离卫生间较近，方便使用', colors: ['green'], status: 'active', roomCount: 12, createdAt: '2023-08-03' },
  { id: 4, name: '空调房', category: 'facility', description: '配备空调设施', colors: ['blue'], status: 'active', roomCount: 20, createdAt: '2023-08-04' },
  { id: 5, name: '高层', category: 'location', description: '位于较高楼层', colors: ['purple'], status: 'active', roomCount: 6, createdAt: '2023-08-05' },
  { id: 6, name: '低层', category: 'location', description: '位于较低楼层', colors: ['green'], status: 'active', roomCount: 10, createdAt: '2023-08-06' },
  { id: 7, name: 'VIP房间', category: 'special', description: '特殊配置的VIP房间', colors: ['red'], status: 'active', roomCount: 2, createdAt: '2023-08-07' },
  { id: 8, name: '维修中', category: 'special', description: '正在维修的房间', colors: ['red'], status: 'inactive', roomCount: 3, createdAt: '2023-08-08' }
]

export const mockRooms = [
  {
    id: 1,
    number: '101',
    buildingId: 1,
    floor: 1,
    totalBeds: 4,
    occupiedBeds: 3,
    description: '标准四人间，设施齐全',
    type: 'standard',
    status: 'available',
    labelIds: [1, 3, 4],
    notes: '房间朝向良好',
    createdAt: '2023-08-01',
    updatedAt: '2023-08-15'
  },
  {
    id: 2,
    number: '102',
    buildingId: 1,
    floor: 1,
    totalBeds: 4,
    occupiedBeds: 4,
    description: '标准四人间',
    type: 'standard',
    status: 'occupied',
    labelIds: [2, 4],
    notes: '',
    createdAt: '2023-08-01',
    updatedAt: '2023-08-15'
  },
  {
    id: 3,
    number: '103',
    buildingId: 1,
    floor: 1,
    totalBeds: 4,
    occupiedBeds: 0,
    description: '维修中',
    type: 'standard',
    status: 'maintenance',
    labelIds: [],
    notes: '需要更换空调',
    createdAt: '2023-08-01',
    updatedAt: '2023-08-15'
  },
  {
    id: 4,
    number: '201',
    buildingId: 1,
    floor: 2,
    totalBeds: 4,
    occupiedBeds: 2,
    description: '高层房间，视野开阔',
    type: 'deluxe',
    status: 'available',
    labelIds: [1, 5, 7],
    notes: 'VIP房间',
    createdAt: '2023-08-01',
    updatedAt: '2023-08-15'
  },
  {
    id: 5,
    number: '202',
    buildingId: 2,
    floor: 2,
    totalBeds: 6,
    occupiedBeds: 6,
    description: '六人间',
    type: 'standard',
    status: 'occupied',
    labelIds: [2, 3],
    notes: '',
    createdAt: '2023-08-01',
    updatedAt: '2023-08-15'
  },
  {
    id: 6,
    number: '301',
    buildingId: 2,
    floor: 3,
    totalBeds: 4,
    occupiedBeds: 1,
    description: '标准四人间',
    type: 'standard',
    status: 'available',
    labelIds: [1, 4],
    notes: '',
    createdAt: '2023-08-01',
    updatedAt: '2023-08-15'
  },
  {
    id: 7,
    number: '302',
    buildingId: 2,
    floor: 3,
    totalBeds: 4,
    occupiedBeds: 0,
    description: '标准四人间',
    type: 'standard',
    status: 'available',
    labelIds: [2, 3],
    notes: '',
    createdAt: '2023-08-01',
    updatedAt: '2023-08-15'
  },
  {
    id: 8,
    number: '401',
    buildingId: 3,
    floor: 4,
    totalBeds: 2,
    occupiedBeds: 2,
    description: '豪华双人间',
    type: 'deluxe',
    status: 'occupied',
    labelIds: [1, 5, 7],
    notes: 'VIP房间',
    createdAt: '2023-08-01',
    updatedAt: '2023-08-15'
  },
  {
    id: 9,
    number: '402',
    buildingId: 3,
    floor: 4,
    totalBeds: 2,
    occupiedBeds: 0,
    description: '豪华双人间',
    type: 'deluxe',
    status: 'available',
    labelIds: [1, 4, 7],
    notes: 'VIP房间',
    createdAt: '2023-08-01',
    updatedAt: '2023-08-15'
  },
  {
    id: 10,
    number: '501',
    buildingId: 3,
    floor: 5,
    totalBeds: 1,
    occupiedBeds: 1,
    description: '豪华套房',
    type: 'suite',
    status: 'occupied',
    labelIds: [1, 5, 7],
    notes: '总统套房',
    createdAt: '2023-08-01',
    updatedAt: '2023-08-15'
  }
]

export const mockBeds = [
  { id: 1, roomId: 1, number: 'A1', position: 'A', status: 'occupied', student: { name: '张三', studentId: '2021001' }, checkInDate: '2023-09-01', notes: '' },
  { id: 2, roomId: 1, number: 'B1', position: 'B', status: 'occupied', student: { name: '李四', studentId: '2021002' }, checkInDate: '2023-09-01', notes: '' },
  { id: 3, roomId: 1, number: 'C1', position: 'C', status: 'occupied', student: { name: '王五', studentId: '2021003' }, checkInDate: '2023-09-01', notes: '' },
  { id: 4, roomId: 1, number: 'D1', position: 'D', status: 'available', student: null, checkInDate: null, notes: '' },
  { id: 5, roomId: 2, number: 'A2', position: 'A', status: 'occupied', student: { name: '赵六', studentId: '2021004' }, checkInDate: '2023-09-01', notes: '' },
  { id: 6, roomId: 2, number: 'B2', position: 'B', status: 'occupied', student: { name: '钱七', studentId: '2021005' }, checkInDate: '2023-09-01', notes: '' },
  { id: 7, roomId: 2, number: 'C2', position: 'C', status: 'occupied', student: { name: '孙八', studentId: '2021006' }, checkInDate: '2023-09-01', notes: '' },
  { id: 8, roomId: 2, number: 'D2', position: 'D', status: 'occupied', student: { name: '周九', studentId: '2021007' }, checkInDate: '2023-09-01', notes: '' },
  { id: 9, roomId: 3, number: 'A3', position: 'A', status: 'maintenance', student: null, checkInDate: null, notes: '床板需要更换' },
  { id: 10, roomId: 3, number: 'B3', position: 'B', status: 'maintenance', student: null, checkInDate: null, notes: '床板需要更换' },
  { id: 11, roomId: 3, number: 'C3', position: 'C', status: 'maintenance', student: null, checkInDate: null, notes: '床板需要更换' },
  { id: 12, roomId: 3, number: 'D3', position: 'D', status: 'maintenance', student: null, checkInDate: null, notes: '床板需要更换' },
  { id: 13, roomId: 4, number: 'A4', position: 'A', status: 'occupied', student: { name: '吴十', studentId: '2021008' }, checkInDate: '2023-09-01', notes: '' },
  { id: 14, roomId: 4, number: 'B4', position: 'B', status: 'occupied', student: { name: '郑十一', studentId: '2021009' }, checkInDate: '2023-09-01', notes: '' },
  { id: 15, roomId: 4, number: 'C4', position: 'C', status: 'available', student: null, checkInDate: null, notes: '' },
  { id: 16, roomId: 4, number: 'D4', position: 'D', status: 'available', student: null, checkInDate: null, notes: '' },
  { id: 17, roomId: 5, number: 'A5', position: 'A', status: 'occupied', student: { name: '王十二', studentId: '2021010' }, checkInDate: '2023-09-01', notes: '' },
  { id: 18, roomId: 5, number: 'B5', position: 'B', status: 'occupied', student: { name: '李十三', studentId: '2021011' }, checkInDate: '2023-09-01', notes: '' },
  { id: 19, roomId: 5, number: 'C5', position: 'C', status: 'occupied', student: { name: '张十四', studentId: '2021012' }, checkInDate: '2023-09-01', notes: '' },
  { id: 20, roomId: 5, number: 'D5', position: 'D', status: 'occupied', student: { name: '刘十五', studentId: '2021013' }, checkInDate: '2023-09-01', notes: '' },
  { id: 21, roomId: 5, number: 'E5', position: 'E', status: 'occupied', student: { name: '陈十六', studentId: '2021014' }, checkInDate: '2023-09-01', notes: '' },
  { id: 22, roomId: 5, number: 'F5', position: 'F', status: 'occupied', student: { name: '杨十七', studentId: '2021015' }, checkInDate: '2023-09-01', notes: '' }
]

export const mockStudents = [
  { id: 1, name: '张三', studentId: '2021001', major: '计算机科学与技术', grade: '2021', phone: '13800138001', email: 'zhangsan@example.com' },
  { id: 2, name: '李四', studentId: '2021002', major: '软件工程', grade: '2021', phone: '13800138002', email: 'lisi@example.com' },
  { id: 3, name: '王五', studentId: '2021003', major: '网络工程', grade: '2021', phone: '13800138003', email: 'wangwu@example.com' },
  { id: 4, name: '赵六', studentId: '2021004', major: '信息安全', grade: '2021', phone: '13800138004', email: 'zhaoliu@example.com' },
  { id: 5, name: '钱七', studentId: '2021005', major: '数据科学与大数据技术', grade: '2021', phone: '13800138005', email: 'qianqi@example.com' },
  { id: 6, name: '孙八', studentId: '2021006', major: '人工智能', grade: '2021', phone: '13800138006', email: 'sunba@example.com' },
  { id: 7, name: '周九', studentId: '2021007', major: '物联网工程', grade: '2021', phone: '13800138007', email: 'zhoujiu@example.com' },
  { id: 8, name: '吴十', studentId: '2021008', major: '电子信息工程', grade: '2021', phone: '13800138008', email: 'wushi@example.com' },
  { id: 9, name: '郑十一', studentId: '2021009', major: '通信工程', grade: '2021', phone: '13800138009', email: 'zhengshiyi@example.com' },
  { id: 10, name: '王十二', studentId: '2021010', major: '自动化', grade: '2021', phone: '13800138010', email: 'wangshier@example.com' }
]

// 模拟API响应
export const createMockResponse = (data, success = true, message = '操作成功') => ({
  success,
  message,
  data,
  timestamp: new Date().toISOString()
})

// 模拟延迟
export const mockDelay = (ms = 500) => new Promise(resolve => setTimeout(resolve, ms))
